﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMC.VISITOR.Application
{
    [SugarTable(null, "海康事件表")]
    [BusinessVS]
    public class HKEvent : EntityBase
    {
        [SugarColumn(ColumnDescription = "事件唯一Id", IsNullable = true)]
        public string eventId { get; set; }
        [SugarColumn(ColumnDescription = "车牌号", IsNullable = true, IndexGroupNameList = new string[] { "index_hkevent_plateno" })]
        public string plateNo { get; set; }
        [SugarColumn(ColumnDescription = "车库唯一编码", IsNullable = true)]
        public string parkIndex { get; set; }
        [SugarColumn(ColumnDescription = "车库名称", IsNullable = true)]
        public string parkName { get; set; }
        [SugarColumn(ColumnDescription = "出入口", IsNullable = true)]
        public string roadwayName { get; set; }
        [SugarColumn(ColumnDescription = "抬杆执行结果", IsNullable = true)]
        public bool? result { get; set; }
        [SugarColumn(ColumnDescription = "执行描述", IsNullable = true)]
        public string message { get; set; }
        [SugarColumn(ColumnDescription = "访客Id", IsNullable = true)]
        public long? visId { get; set; }

        [SugarColumn(ColumnDescription = "事件消息", IsNullable = true,ColumnDataType = StaticConfig.CodeFirst_BigString)]
        public string paramsObj { get; set; }
        [SugarColumn(ColumnDescription = "是否启用栏杆自动落下", IsNullable = true, IndexGroupNameList = new string[] { "index_hkevent_autoclose" })]
        public bool? isCarDoorAutoClose { get; set; } = false;
        [SugarColumn(ColumnDescription = "栏杆抬起后的结果",Length =2000, IsNullable = true)]
        public string currentStatus { get; set; }
        /// <summary>
        /// 当前时间大于此时间则可以执行落杆动作
        /// </summary>
        [SugarColumn(ColumnDescription = "执行时间应大于此时间", IsNullable = true, IndexGroupNameList = new string[] { "index_hkevent_htime" })]
        public DateTime? handlerTime { get; set; }

        [SugarColumn(ColumnDescription = "备份")]
        public DateTime? handlerTimeBak { get; set; }

        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, IsOnlyIgnoreUpdate = true, IndexGroupNameList = new string[] { "index_hkevent_ctime" })]
        public override DateTime? CreateTime { get; set; }
    }


}
